
package com.hsteach.framework.feign.client.xgk;

import com.hsteach.framework.feign.ClientConstant;
import com.hsteach.framework.feign.client.FeignConfig;
import com.hsteach.framework.feign.client.xgk.dto.XgkListResp;
import com.hsteach.framework.feign.client.xgk.dto.XgkListResp2;
import com.hsteach.framework.feign.client.xgk.dto.ret.GetParentsRet;
import com.hsteach.framework.feign.client.xgk.dto.ret.GetTeacherRet;
import com.hsteach.framework.feign.client.xgk.dto.ret.GetUserInfoRet2;
import com.hsteach.framework.feign.client.xgk.dto.ret.preschool.PreschoolGetTeacherRet;
import org.apache.ibatis.annotations.Param;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 〈〉
 *
 * @author lsf
 * @create 2023/7/6
 * @since 1.0.0
 */
//@FeignClient(name = "preschoolXgkClient", url = "${interface.preschool_xgk.domain:127.0.0.1:8079}", configuration = FeignConfig.class)
@FeignClient(name = "preschoolXgkClient", url = "${interface.xgk.domain:127.0.0.1:8079}", configuration = FeignConfig.class)
public interface PreschoolXgkClient {


    /**
     *
     * @param
     * @return
     */
    @GetMapping("/xgk/iscbmp/iscbmpwebgateway/v1/eclass/parents/communicationinfo?accessToken={accessToken}")
//    XgkListResp<GetParentsRet> getParentList(@PathVariable(ClientConstant.AUTH_ACCESS_TOKEN) String accessToken);
    XgkListResp<GetParentsRet> getParentList(@Param(ClientConstant.AUTH_ACCESS_TOKEN) String accessToken);

    /**
     * 根据accessToken获取幼教班级教师通讯录信息
     * @param accessToken 大平台accessToken
     * @param classId 班级ID，不传则查询当前登录用户可以看到的所有老师
     * @return
     */
    @GetMapping("/xgk/iscbmp/iscbmpwebgateway/v1/eclass/teachers/communicationinfo")
    XgkListResp<PreschoolGetTeacherRet> getPreschoolTeacherByClassId(@RequestParam("access_token") String accessToken, @RequestParam("class_id") String classId);

    /**
     * 获取用户权限数据
     * @return
     */
    @GetMapping("/xgk/iscbmp/iscbmpwebgateway/v1/system/menu/structure")
    XgkListResp2<GetUserInfoRet2> getUserInfo2(@RequestParam(ClientConstant.XGK_ACCESS_TOKEN) String accessToken,
                                               @RequestParam(ClientConstant.XGK_APP_IDS) String appIds);
}
